package com.tedu.sp04.feign;
/*
 通过ofenfeign技术远程调用【商品信息】接口
 */
import com.tedu.sp01.entity.Item;
import com.tedu.web.util.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
@FeignClient(name = "item-service")
public interface ItemClient {
    @GetMapping("/{orderId}") //get+restful
    JsonResult<List<Item>> getItems(@PathVariable String orderId);
    @PostMapping("/decreaseNumber") //post
    JsonResult<?> decreaseNumber(@RequestBody List<Item> items);
}
